package com.csj.lc.mapper;

import com.csj.lc.entity.Operation;
import com.csj.lc.entity.Role;
import com.csj.lc.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface UserMapper {

    User query(String userName);

    User queryById(int userId);

    boolean update(User user);

    boolean changePassword(HashMap<String,Object> map);

    List<User> getAll();

    int getCount(int roleId);

    List<User> getList( int roleId , int startPos, int pageSize);

    Role getRole(int roleId);

    List<Operation> queryOps(HashMap map);

    List<Operation> queryOps2(int userId);


    // 当下列语句为子查询的子select语句时，无需在接口中写出
    //    List<Operation> getOps(int userId);

}
